package day1107_3;

import java.io.*;

public class T2 {
    public static void main(String[] args) throws IOException {
        FileReader  fr=new FileReader("D:\\k.txt");//FilterReader读取一个txt文件
        FileWriter  fw=new FileWriter("D:\\k2.txt");
        //FilterWriter将读取的数据写出到另一个txt文件
        int letter=0;
        while(   (letter=fr.read()) != -1    ){
            System.out.print( (char)letter );
            fw.write(letter);
        }
        fw.close();
        fr.close();

    }


}
